package db;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class DBUser {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent(name = "name")
    private String name;

    @Persistent(name = "pass")
    private String pass;

    @Persistent(name = "pis")
    private String pis;

    @Persistent(name = "isAdm")
    private boolean isAdmin;

    @Persistent(name = "chave")
    private final String chave;

    public DBUser(String name, String pass, String pis, boolean isAdmin) {
        this.name = name;
        this.pass = pass;
        this.pis = pis;
        this.isAdmin = isAdmin;

        this.chave = "blah";
    }

    public Key getKey() {
        return key;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getPis() {
        return pis;
    }

    public void setPis(String pis) {
        this.pis = pis;
    }

    public boolean isAdmin() {
        return isAdmin;
    }

    public void setAdmin(boolean isAdmin) {
        this.isAdmin = isAdmin;
    }

}
